const http = require('http');
const url = require('url');

let server = http.createServer();

server.on('request',(req,res)=>{
  if(req.url.startsWith('/proxy')) {

    res.setHeader('set-cookie','age=1')
    res.end('ok,cookie:' + JSON.stringify(req.headers.cookie));
  }
});

server.listen(8888);